<?php

use think\facade\Route;

Route::rest([
    'index'   => ['GET', '', 'list'],
    'read' => ['GET', '/:id', 'detail'],
    'save' => ['POST', '', 'add'],
    'update' => ['PUT', '/:id', 'edit'],
    'delete' => ['DELETE', '/:id', 'delete'],
]);

Route::group('attr', function () {
    // 商家服务
    Route::get('shop_type/type_list', 'admin.attr.ShopType/typeList')->name('admin.attr.ShopType.typeList');
    Route::get('shop_type/list', 'admin.attr.ShopType/list')->name('admin.attr.ShopType.list');
    Route::resource('shop_type', 'admin.attr.ShopType');

})->middleware('check_login', 'admin');
